﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;

namespace VerficationsWPF.Verifications
{
    /// <summary>
    /// RoundCornerWindow.xaml 的交互逻辑
    /// </summary>
    public partial class RoundCornerWindow : Window
    {
        public RoundCornerWindow()
        {
            InitializeComponent();
        }

        private void btnConfirm_Click(object sender, RoutedEventArgs e)
        {
            Close();
        }

        private void btnCancel_Click(object sender, RoutedEventArgs e)
        {
            Close();
        }


        bool mouseDown = false;
        private void btnCancel_MouseDown(object sender, MouseButtonEventArgs e)
        {
            mouseDown = true;
            bdCancel.Background = Brushes.DarkGray;
        }

        private void btnCancel_MouseEnter(object sender, MouseEventArgs e)
        {
            bdCancel.Background = Brushes.Gray;
        }

        private void btnCancel_MouseLeave(object sender, MouseEventArgs e)
        {
            bdCancel.Background = Brushes.LightGray;
        }

        private void btnCancel_MouseUp(object sender, MouseButtonEventArgs e)
        {
            if(mouseDown)
                Close();
        }
    }
}
